The communications industry is rapidly changing to adjust to emerging technologies and ever increasing customer demand. This customer demand for new applications and increased performance of existing applications is driving communications network and system providers to employ networks and systems having greater speed and capacity (e.g., greater bandwidth). In trying to achieve these goals, a common approach taken by many communications providers is to use packet switching technology. Increasingly, public and private communications networks are being built and expanded using various packet technologies, such as Internet Protocol (IP).
A flow is a set of packets passing through a network during a certain time interval that possess some common properties. A flow identification value is a way of identifying a particular flow. For example, a flow for IPv4 might be identified by the flow identification value consisting of, or including the tuple {source address, destination address, source port, destination port, protocol type}. A flow typically has a stream of packets associated with it. The identification of which flow a particular packet belongs is useful for determining how to process one or more packets in the stream of packets.
However, certain applications such as, but not limit to billing, statistics collection, routing, quality of service, access control, network management, and others may not need to know the actual flow with which a packet is actually associated. Rather, for example, an application might only be concerned with processing packets based on a source address, a source—destination address pair, etc. In this situation, a prior system has applied the same flow mask to the flow label associated with each packet to mask out the fields not of interest. This is fine if every packet's flow label is to be masked in the same manner and processed in the same manner. However, this is not always the case. For example, statistics and billing information might be desired to be collected for all packets from a particular source (irregardless of a packets destination), while simultaneously, billing information should be collected for each destination that a packet is sent from a different particular source address. Using a common or global mask for all packet flow does not allow desired individualized control.
In this situation, a prior system collects the most detailed information, and then post-processed this information to generate the desired results. However, this is inefficient as more information must be collect than that which is actually needed, and collection of this vast and unneeded amount of information may not be feasible, especially as packet rates continue to increase.
Another previous system selects a block mask of a ternary content addressable memory in response to the particular protocol type of a given packet. However, the number of block masks typically available is a small number, and being incapable of being expanded by several orders of magnitude to accommodate the vast number of flows being sent through a router. Thus, this prior approach does not provide adequate capabilities. Needed are new methods and mechanisms for dynamic processing of packets.